﻿using XCore.Dapper;
using XCore.Domain.Entities;

namespace SaaS.Core.Logger
{
    /// <summary>
    /// 日志服务入库基类
    /// </summary>
    public class LoggerService : DapperProvider
    {
        public bool Save<TEntity>(TEntity entity) where TEntity : IEntity<long>
        {
            using (IDapperRepository dapper = CreateDapperDatabase(CoreSetting.LogConnectionString))
            {
                return dapper.Insert<TEntity, long>(entity);
            }
        }
    }
}
